;---------------------------------------------------------------------------
;Star Toss
[Statedef 1000]
type    = S
movetype= I
physics = S
poweradd = 40
velset = 0,0
anim = 1000
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1000, 1]
type = VarSet
trigger1 = !Time
v = 11
value = 0

[State 1000, 2]
type = VarSet
trigger1 = !Var(59) && Time >= 1
var(11) = Cond(Cond(Facing = 1, NumExplod(90000006), NumExplod(90000004)),1,Cond(Cond(Facing = 1, NumExplod(90000004), NumExplod(90000006)),2,0))

[State 1000, 3]
type = VarSet
trigger1 = Var(59) && Time >= 1
var(11) = ifelse(random <= 101, 0, ifelse(random <= 299, 2, 1))

[State 1000, 4]
type = Helper
trigger1 = AnimElem = 4
name = "Star"
ID = 1000
stateno = 1001
pos = 28,-37
postype = p1
facing = 1
ownpal = 1

[State 1000, 5]
type = VarAdd
trigger1 = AnimElem = 4
var(37) = 1

[State 1000, 6]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8030
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1000, 7]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8030
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1000, 8]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1000, 9]
type = StateTypeSet
trigger1 = Time = 11
movetype = A

[State 1000, 10]
type = StateTypeSet
trigger1 = Time = 13
movetype = I

[State 1000, 11]
type = PlaySnd
trigger1 = AnimElem = 4
value = S1000,0
channel = 0

[State 1000, 12]
type = PlaySnd
trigger1 = AnimElem = 5
value = S1000,1

[State 1000, 13]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;-------------------------------------------------------------------------
;Star
[Statedef 1001]
type    = S
movetype= A
physics = N
ctrl = 0
velset = 8.5+(IfElse(parent,Var(11) = 1,2,IfElse(parent,Var(11) = 2,-1,0)))
anim = 1001
sprpriority = 2

[State 1001, 1]
type = HitBy
trigger1 = 1
value = SCA,NP,SP,HP
time = -1

[State 1001, 2]
type = HitOverride
trigger1 = 1
attr = SCA,NP,SP,HP
slot = 0
stateno = 1002
time = -1

[State 1001, 3]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 1001, 4]
type = HitDef
trigger1 = root,var(5) < 6 && !Time
attr = S, SP
damage = ceil(45*root,Fvar(20)),12
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1,1
sparkno = -1
hitsound = F5, 1
guardsound = F6, 0
ground.type = High
ground.slidetime = 18
ground.hittime  = 22
guard.slidetime = 15
guard.hittime = 18
ground.velocity = -5
ground.cornerpush.veloff = 0
air.type = High
air.velocity = -2.4,-3
air.hittime = 15
id = 1001
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1
getpower = 0,0
givepower = 25, 13

[State 1001, 5]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && root,Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1
persistent = 0

[State 1001, 6]
type = ParentVarAdd
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 1001, 7]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 1001, 8]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 1001, 9]
type = ChangeState
trigger1 = MoveContact
value = 1002

[State 1001, 10]
type = ChangeState
trigger1 = FrontEdgeDist < -40
value = 1003
;-------------------------------------------------------------------------
;Star Explod
[Statedef 1002]
type    = S
movetype= A
physics = N
ctrl = 0
velset = 0,0
anim = 6001

[State 1002, 1]
type = PowerAdd
trigger1 = !Time && PrevStateNo = 1001
value = 50-25*(NumTarget && MoveGuarded)
ignorehitpause = 1

[State 1002, 2]
type = ParentVarAdd
trigger1 = !Time
var(37) = -1

[State 1002, 3]
type = VarAdd
trigger1 = (PrevStateNo != [3000,3999]) && !Time
var(0) = 1

[State 1002, 4]
type = ChangeAnim
trigger1 = !AnimTime
value = 1

[State 1002, 5]
type = DestroySelf
trigger1 = !NumTarget && Anim = 1
trigger2 = NumTarget && Anim = 1
trigger2 = target,StateType = L
;-------------------------------------------------------------------------
;Star Disappear
[Statedef 1003]
type    = S
movetype= A
physics = N
anim = 1
ctrl = 0
velset = 0,0

[State 1003, 1]
type = ParentVarAdd
trigger1 = !Time
var(37) = -1

[State 1003, 2]
type = DestroySelf
triggerall = root,Var(37) = 0
trigger1 = !NumTarget && Anim = 1
trigger2 = NumTarget && Anim = 1
trigger2 = target,StateType = L
;---------------------------------------------------------------------------
;Star Throw (Air)
[Statedef 1005]
type    = A
movetype= I
physics = N
poweradd = 40
anim = 1005
ctrl = 0
sprpriority = 2

[State 1050, 1]
type = Helper
trigger1 = AnimElem = 4
name = "Fire Ball"
ID = 1000
stateno = 1006
pos = 35,-25
postype = p1
facing = 1
ownpal = 1

[State 1005, 2]
type = VarAdd
trigger1 = AnimElem = 4
var(37) = 1

[State 1005, 3]
type = VelAdd
trigger1 = 1
y = .44

[State 1005, 4]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8030
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 12
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1005, 5]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8030
ID = 8030
pos = 239,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 12
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1005, 6]
type = PlaySnd
trigger1 = AnimElem = 3
value = S1000,0
channel = 0

[State 1005, 7]
type = StateTypeSet
trigger1 = Time = 9
movetype = A

[State 1005, 8]
type = StateTypeSet
trigger1 = Time = 11
movetype = I

[State 1005, 9]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1005, 10]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 1007
;---------------------------------------------------------------------------
;Fire Ball
[Statedef 1006]
type    = A
movetype= A
physics = N
velset = 5.36,6.93
anim = 1006
ctrl = 0
sprpriority = 2

[State 1006, 1]
type = HitBy
trigger1 = 1
value = SCA,SA,HA,AP
time = -1

[State 1006, 2]
type = HitOverride
trigger1 = 1
attr = SCA,SA,HA,AP
stateno = 1002
time = -1
ignorehitpause = 1

[State 1006, 3]
type = HitDef
trigger1 = root,var(5) < 6 && !Time
attr = A,SA
hitflag = MAF
guardflag = MA
animtype = Hard
priority = 4,Hit
damage = ceil(45*root,Fvar(20)),12
pausetime = 1,1
sparkno = -1
guard.sparkno = -1
sparkxy = -9,-17*floor(const(size.yscale))
hitsound = F5,1
guardsound = F6,0
ground.type = High
ground.slidetime = 13
ground.hittime  = 18
guard.slidetime = 8
guard.hittime = 11
ground.velocity = -8.2*const(size.xscale)
ground.cornerpush.veloff = 0
air.type = High
air.hittime = 24
air.velocity = -2.3, -1.6
air.fall = 1
fall.recover = 0
id = 1050
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1
getpower = 0,0
givepower = 25, 13

[State 1006, 4]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && root,Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1
persistent = 0

[State 1006, 5]
type = ParentVarAdd
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 1006, 6]
type = PlaySnd
trigger1 = !Time
value = S1005,0
channel = 2

[State 1006, 6]
type = PlaySnd
trigger1 = !Time
value = S1005,0

[State 1006, 11]
type = ChangeState
trigger1 = MoveContact
value = 1002

[State 1006, 12]
type = ChangeState
trigger1 = FrontEdgeDist < -40
trigger2 = Pos Y > 50
value = 1003
;---------------------------------------------------------------------------
;Star Throw (Land)
[Statedef 1007]
type    = S
movetype= I
physics = N
anim = 1007
velset = 0,0
ctrl = 0
sprpriority = 2

[State 1007, 1]
type = PosSet
trigger1 = !Time
y = 0

[State 1007, 2]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;EX Weapon Shot (Ground)
[Statedef 1010]
type    = S
movetype= I
physics = S
poweradd = -500
velset = 0,0
anim = 1000
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1010, 1]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1010, 2]
type = PlaySnd
trigger1 = !Time
value = F799,0
channel = 10

[State 1010, 4]
type = Helper
trigger1 = AnimElem = 4
name = "Windmill Shruiken"
ID = 1000
stateno = 1011
pos = 28,-37
postype = p1
facing = 1
ownpal = 1

[State 1010, 5]
type = VarAdd
trigger1 = AnimElem = 4
var(37) = 1

[State 1010, 6]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8033
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1010, 7]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8033
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1010, 8]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1010, 9]
type = StateTypeSet
trigger1 = Time = 11
movetype = A

[State 1010, 10]
type = StateTypeSet
trigger1 = Time = 13
movetype = I

[State 1010, 11]
type = PlaySnd
trigger1 = AnimElem = 4
value = S1000,0
channel = 0

[State 1010, 12]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;-------------------------------------------------------------------------
;Windmill Shruiken
[Statedef 1011]
type    = S
movetype= A
physics = N
ctrl = 0
velset = 18.5,0
anim = 1011
sprpriority = 2

[State 1011, 1]
type = HitBy
trigger1 = 1
value = SCA,HA,HP
time = -1

[State 1011, 2]
type = HitOverride
trigger1 = 1
attr = SCA,HA,HP
slot = 0
stateno = 1002
time = -1

[State 1011, 3]
type = PlayerPush
trigger1 = 1
value = 0
ignorehitpause = 1

[State 1011, 4]
type = HitDef
triggerall = (!HitCount && Var(5) < 6) || HitCount
trigger1 = !var(1)
attr = S, SP
damage = ceil(45*root,Fvar(21)),12
animtype = Hard
getpower = 0
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1,1
sparkno = S6001
hitsound = F5, 2
guardsound = F6, 0
ground.type = High
ground.slidetime = 13
ground.hittime  = 18
guard.slidetime = 8
guard.hittime = 11
ground.velocity = -5+10*(Vel X < 0)
ground.cornerpush.veloff = 0
air.type = High
air.velocity = -2.4,-3
air.hittime = 15
id = 1001
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1
getpower = 0,0
givepower = 13, 7

[State 1011, 5]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && HitPauseTime = 1 && !Var(2) && root,Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1

[State 1011, 6]
type = VarAdd
trigger1 = NumTarget && MoveHit && !Var(2)
var(2) = 1

[State 1011, 7]
type = VarSet
trigger1 = !NumTarget
var(2) = 0

[State 1011, 8]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && P2StateType = A
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 1011, 9]
type = VarAdd
triggerall = NumTarget && MoveContact
trigger1 = HitCount = 1
var(0) = 1
ignorehitpause = 1

[State 1011, 10]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 
ignorehitpause = 1

[State 1011, 11]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y
ignorehitpause = 1

[State 1011, 12]
type = VelAdd
trigger1 = ParentDist X < 0 || ParentDist X > 0
x = ParentDist X * 0.01
ignorehitpause = 1

[State 1011, 13]
type = VelSet
trigger1 = ParentDist Y < 37 || ParentDist Y > 37
y = (((root,Pos Y - 37) - Pos Y))*0.09
ignorehitpause = 1

[State 1011, 14]
type = VarSet
trigger1 = MoveContact = 1
var(1) = 1
ignorehitpause = 1

[State 1011, 15]
type = VarSet
trigger1 = Vel X = [-0.99,0.99]
var(1) = 0
ignorehitpause = 1

[State 1011, 16]
type = PlaySnd
trigger1 = !Time
value = S1010,0
channel = 5

[State 1011, 17]
type = ChangeState
trigger1 = Time >= 15 && (ParentDist X = [-34.9,34]) ;&& (ParentDist Y = [-38.9,-15]) 
value = 1003
;---------------------------------------------------------------------------
;EX Weapon Shot (Air)
[Statedef 1015]
type    = A
movetype= I
physics = N
poweradd = -500
anim = 1005
ctrl = 0
sprpriority = 2

[State 1015, 1]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1015, 2]
type = PlaySnd
trigger1 = !Time
value = F799,0
channel = 10

[State 1015, 3]
type = Helper
trigger1 = AnimElem = 4
name = "Windmill Shruiken"
ID = 1000
stateno = 1011
pos = 28,-37
postype = p1
facing = 1
ownpal = 1

[State 1015, 3]
type = VarAdd
trigger1 = AnimElem = 4
var(37) = 1

[State 1015, 4]
type = VelAdd
trigger1 = 1
y = .44

[State 1015, 5]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8033
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1015, 6]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8033
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1015, 7]
type = StateTypeSet
trigger1 = Time = 9
movetype = A

[State 1015, 8]
type = StateTypeSet
trigger1 = Time = 11
movetype = I

[State 1015, 9]
type = PlaySnd
trigger1 = AnimElem = 3
value = S1000,0
channel = 0

[State 1015, 10]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1015, 11]
type = PowerAdd
trigger1 = Vel Y > 0 && Pos Y > -Vel Y && AnimElemTime(4) < 0
value = 500

[State 1015, 12]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 1052
;---------------------------------------------------------------------------
;Jump and Slash
[Statedef 1050]
type    = S
movetype= A
physics = S
poweradd = 60*(1-var(53))
velset = 0,0
anim = 1050
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1050, 1]
type = VarSet
trigger1 = !var(59) && !Time && !var(53)
var(10) = NumExplod(90000240) != 0

[State 1050, 2]
type = VarSet
trigger1 = var(59) && !Time && !var(53)
var(10) = PrevStateNo = 210 || PrevStateNo = 230 || PrevStateNo = 410 || PrevStateNo = 430

[State 1050, 3]
type = PosAdd
trigger1 = AnimElem = 2 || AnimElem = 3
x = 4

[State 1050, 4]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8031
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1050, 5]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8031
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1050, 6]
type = PlaySnd
trigger1 = AnimElem = 3
value = S1050,0
channel = 0

[State 1050, 8]
type = ChangeState
trigger1 = !AnimTime
value = 1051
;---------------------------------------------------------------------------
;Jump and Slash
[Statedef 1051]
type    = A
movetype= A
physics = N
velset = 7.8-6.5*var(10),-5.1-3.6*var(10)
anim = 1051
ctrl = 0
sprpriority = 2

[State 1051, 1]
type = VelSet
triggerall = var(59) && var(10)
trigger1 = !Time
x = 7.8
y = -5.1

[State 1051, 2]
type = VelSet
triggerall = var(59) && !var(10)
triggerall = (abs(P2BodyDist X) > 40.2 && abs(P2BodyDist X) <= 65.7) && P2StateType = A
trigger1 = !Time
x = 1.3
y = -8.7

[State 1051, 3]
type = VelSet
triggerall = var(59) && !var(10)
triggerall = (abs(P2BodyDist X) > 40.2 && abs(P2BodyDist X) <= 65.7) && P2StateType != A
trigger1 = !Time
x = 7.8
y = -5.1

[State 1051, 4]
type = PosAdd
trigger1 = !Time
x = 12

[State 1051, 5]
type = HitDef
triggerall = (!HitCount && Var(5) < 6) || HitCount
triggerall = !var(10) && HitCount < 3
trigger1 = AnimElemTime(1) = 0 || !AnimTime ;!Time || !AnimTime
attr = S, SA
damage = ceil(30*Fvar(20)),8
animtype = Hard
getpower = 40*(1-var(53)), 20*(1-var(53))
givepower = 20,10
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = S6001
sparkxy = -9,-25*floor(const(size.yscale))
hitsound = F5, 2
guardsound = F6, 0
ground.type = High
ground.slidetime = 13
guard.slidetime = 10
ground.hittime  = 15
guard.hittime = 10
ground.velocity = -3.2
air.type = High
air.velocity = -2.3,-1.4
air.hittime = 15
fall = 0
air.fall = 1
fall.recover = 0
id = 1051
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1051, 6]
type = HitDef
triggerall = (!HitCount && Var(5) < 6) || HitCount
triggerall = var(10) && HitCount < 3
trigger1 =  AnimElemTime(1) = 0 || !AnimTime;!Time || !AnimTime
attr = S, SA
damage = ceil(30*Fvar(20)),8
animtype = Hard
getpower = 40*(1-var(53)), 20*(1-var(53))
givepower = 20,10
guardflag = MAF
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = S6001
sparkxy = -9,-25*floor(const(size.yscale))
hitsound = F5, 2
guardsound = F6, 0
ground.type = High
ground.slidetime = 13
guard.slidetime = 10
ground.hittime  = 15
guard.hittime = 10
ground.velocity = -2.3
air.type = High
air.velocity = -1.2,-2.8
air.hittime = 15
fall = 0
air.fall = 1
fall.recover = 0
id = 1051
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1051, 7]
type = Null
triggerall = Cond(NumTarget,!(target,Time),0) && MoveHit && !Var(29) && FVar(21) > .3
trigger1 = (FVar(21) := FVar(21) - .1) && (Var(29) := 1)
ignorehitpause = 1

;[State 1051, 7]
;type = VarAdd
;trigger1 = Cond(NumTarget,!(target,Time),0) && MoveHit && HitCount = 1 && Fvar(21) > .3
;fvar(21) = -0.1
;ignorehitpause = 1

[State 1051, 8]
type = Gravity
trigger1 = 1

[State 1051, 9]
type = PlaySnd
trigger1 = AnimElem = 1 || !AnimTime
value = S190,0

[State 1051, 10]
type = PlaySnd
trigger1 = !Time
value = S190,1

[State 1051, 11]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 1052
;---------------------------------------------------------------------------
;Jump and Slash
[Statedef 1052]
type    = S
movetype= I
physics = S
velset = 0,0
anim = 1007
ctrl = 0
sprpriority = 2

[State 1052, 1]
type = PosSet
trigger1 = !Time
y = 0

[State 1052, 2]
type = PowerAdd
triggerall = PrevStateNo = 1065
trigger1 = !Time
value = 500

[State 1052, 3]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1052, 4]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Jump and Slash
[Statedef 1055]
type    = A
movetype= A
physics = N
poweradd = 80
anim = 1050
ctrl = 0
sprpriority = 2

[State 1055, 1]
type = VarSet
trigger1 = !Time
var(10) = NumExplod(90000240) != 0

[State 1055, 2]
type = VelAdd
trigger1 = 1 
y = .21

[State 1055, 3]
type = PosAdd
trigger1 = AnimElem = 2 || AnimElem = 3
x = 4

[State 1055, 4]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8031
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1055, 6]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8031
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1055, 7]
type = PlaySnd
trigger1 = AnimElem = 3
value = S1050,0
channel = 0

[State 1055, 8]
type = ChangeState
trigger1 = !AnimTime
value = 1056

[State 1055, 9]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 1052
;---------------------------------------------------------------------------
;Jump and Slash
[Statedef 1056]
type    = A
movetype= A
physics = N
velset = 5.1-4*var(10),-3.2-2.6*var(10)
anim = 1051
ctrl = 0
sprpriority = 2

[State 1056, 1]
type = PosAdd
trigger1 = !Time
x = 8

[State 1056, 2]
type = HitDef
triggerall = (!HitCount && Var(5) < 6) || HitCount
trigger1 = !Time || !AnimTime
attr = A, SA
damage = ceil(30*Fvar(20)),8
animtype = Hard
getpower = 40*(1-var(53)), 20*(1-var(53))
givepower = 20,10
guardflag = MAF
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = S6001
sparkxy = -9,-25*floor(const(size.yscale))
hitsound = F5, 2
guardsound = F6, 0
ground.type = High
ground.slidetime = 13
guard.slidetime = 9
ground.hittime  = 16
guard.hittime = 9
ground.velocity = -3.2
air.type = High
air.velocity = -2.1,-2.8
air.hittime = 15
fall = 0
air.fall = 1
fall.recover = 0
id = 1051
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1056, 3]
type = Null
triggerall = Cond(NumTarget,!(target,Time),0) && MoveHit && !Var(29) && FVar(21) > .3
trigger1 = (FVar(21) := FVar(21) - .1) && (Var(29) := 1)
ignorehitpause = 1

[State 1056, 4]
type = Gravity
trigger1 = 1

[State 1056, 5]
type = PlaySnd
trigger1 = AnimElem = 1 || !AnimTime
value = S190,0

[State 1056, 6]
type = PlaySnd
trigger1 = !Time
value = S190,1

[State 1056, 7]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 1052
;---------------------------------------------------------------------------
;EX Jump and Slash
[Statedef 1060]
type    = S
movetype= A
physics = S
poweradd = -500
velset = 0,0
anim = 1050
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1060, 1]
type = VarSet
trigger1 = !Var(59) && !AnimTime
var(10) = Command = "holdfwd"

[State 1060, 2]
type = VarSet
trigger1 = Var(59) && !Time
var(10) = abs(P2BodyDist X) < 25.2 && (P2StateType != A && P2StateType != L) && BackEdgeDist < 23.3

[State 1060, 3]
type = NotHitBy
trigger1 = !var(10)
value = SCA,AA,AP,AT
time = 1

[State 1060, 4]
type = HitBy
trigger1 = var(10)
value = SCA,AP
time = 1

[State 1060, 5]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1060, 6]
type = PlaySnd
trigger1 = !Time
value = F799,0
channel = 10

[State 1060, 7]
type = AssertSpecial
trigger1 = (GameTime % 2) = 0
flag = invisible

[State 1060, 8]
type = PosAdd
trigger1 = AnimElem = 2 || AnimElem = 3
x = 4

[State 1060, 9]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8034
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1060, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8034
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1060, 11]
type = PlaySnd
trigger1 = AnimElem = 3
value = S1050,0
channel = 0

[State 1060, 12]
type = ChangeState
trigger1 = !AnimTime
value = 1061
;---------------------------------------------------------------------------
;EX Jump and Slash
[Statedef 1061]
type    = A
movetype= A
physics = N
velset = 1.3+(6.5*var(10)),-8.7+(3.6*var(10))
anim = 1051
ctrl = 0
sprpriority = 2

[State 1051, 1]
type = VelSet
triggerall = Var(59)
triggerall = ((enemy,fvar(30) <= 62.4) && (enemy,fvar(30) > 0)) || ((enemy,fvar(32) <= 62.4) && (enemy,fvar(32) > 0)) || ((enemy,fvar(34) <= 62.4) && (enemy,fvar(34) > 0))
triggerall = (enemy,fvar(31) > -52.6) || (enemy,fvar(33) > -52.6)|| (enemy,fvar(35) > -52.6)
trigger1 = !Time
x = 7.8
y = -5.1

[State 1051, 2]
type = VelSet
triggerall = Var(59)
triggerall = abs(P2BodyDist X) < 25.2 && (P2StateType != A && P2StateType != L) && BackEdgeDist < 23.3
trigger1 = !Time
x = 1.3
y = -8.7

[State 1061, 3]
type = NotHitBy
trigger1 = var(10) && Time < 5
value = SCA,AA,AP,AT
time = 1

[State 1061, 4]
type = HitBy
trigger1 = !var(10)
value = SCA,AA,AT
time = 1

[State 1061, 5]
type = AssertSpecial
triggerall = var(10) && Time < 5
trigger1 = (GameTime % 2) = 0
flag = invisible

[State 1061, 6]
type = AssertSpecial
triggerall = !var(10)
trigger1 = (GameTime % 2) = 0
flag = invisible


[State 1061, 7]
type = PosAdd
trigger1 = !Time
x = 8

[State 1061, 8]
type = HitDef
triggerall = (!HitCount && Var(5) < 6) || HitCount
triggerall = !var(10) && HitCount < 3
trigger1 = !Time || !AnimTime
attr = S, SA
damage = ceil(30*Fvar(20)),8
animtype = Hard
guardflag = MAF
hitflag = MAF
priority = 4, Hit
getpower = 0,0
givepower = 20,10
pausetime = 8,8
sparkno = S6001
sparkxy = -9,-25*floor(const(size.yscale))
hitsound = F5, 3
guardsound = F6, 0
ground.type = High
ground.slidetime = 13
ground.hittime  = 16
guard.slidetime = 13
guard.hittime = 13
ground.velocity = -1.2, -5.4
air.type = High
air.velocity = -0.9, -4
air.hittime = 15
fall = 1
fall.recover = 0
id = 1061
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1061, 9]
type = HitDef
triggerall = (!HitCount && Var(5) < 6) || HitCount
triggerall = var(10) && HitCount < 3
trigger1 = !Time || !AnimTime
attr = S, SA
damage = ceil(30*Fvar(20)),8
animtype = Hard
guardflag = MAF
hitflag = MAF
priority = 4, Hit
getpower = 0,0
givepower = 20,10
pausetime = 8,8
sparkno = S6001
sparkxy = -9,-25*floor(const(size.yscale))
hitsound = F5, 3
guardsound = F6, 0
ground.type = High
ground.slidetime = 13
guard.slidetime = 11
ground.hittime  = 16
guard.hittime = 11
ground.velocity = -2.2, -1.1
air.type = High
air.velocity = -0.9, -1.6
air.hittime = 15
fall = 1
fall.recover = 0
id = 1061
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1061, 10]
type = Null
triggerall = Cond(NumTarget,!(target,Time),0) && MoveHit && !Var(29) && FVar(21) > .3
trigger1 = (FVar(21) := FVar(21) - .1) && (Var(29) := 1)
ignorehitpause = 1

[State 1061, 11]
type = Gravity
trigger1 = 1

[State 1061, 12]
type = PlaySnd
trigger1 = AnimElem = 1 || !AnimTime
value = S190,0

[State 1061, 13]
type = PlaySnd
trigger1 = !Time
value = S190,1

[State 1061, 14]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 1052
;---------------------------------------------------------------------------
;Jump and Slash
[Statedef 1065]
type    = A
movetype= A
physics = N
poweradd = -500
anim = 1050
ctrl = 0
sprpriority = 2

[State 1065, 1]
type = VarSet
trigger1 = !var(59) && !AnimTime
var(10) = Command = "holdfwd"

[State 1065, 2]
type = VelAdd
trigger1 = 1 
y = .21

[State 1065, 3]
type = HitBy
trigger1 = !var(10)
value = SCA,AA
time = 1

[State 1065, 4]
type = HitBy
trigger1 = var(10)
value = SCA,AP
time = 1

[State 1065, 5]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1065, 6]
type = PlaySnd
trigger1 = !Time
value = F799,0
channel = 10

[State 1065, 7]
type = PosAdd
trigger1 = AnimElem = 2 || AnimElem = 3
x = 4

[State 1065, 8]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8034
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1065, 9]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8034
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1065, 10]
type = PlaySnd
trigger1 = AnimElem = 3
value = S1050,0
channel = 0

[State 1065, 11]
type = ChangeState
trigger1 = !AnimTime
value = 1066

[State 1065, 12]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 1052
;---------------------------------------------------------------------------
;Jump and Slash
[Statedef 1066]
type    = A
movetype= A
physics = N
velset = 1.1+4*var(10),-5.8+2.6*var(10)
anim = 1051
ctrl = 0
sprpriority = 2

[State 1066, 1]
type = HitBy
trigger1 = !var(10)
value = SCA,AA,AT
time = 1

[State 1066, 2]
type = HitBy
trigger1 = var(10)
value = SCA,AP
time = 1

[State 1066, 3]
type = AssertSpecial
trigger1 = var(10) && Time < 5 && (GameTime % 2) = 0
flag = invisible

[State 1066, 4]
type = AssertSpecial
trigger1 = !var(10) && (GameTime % 2) = 0
flag = invisible

[State 1066, 5]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1066, 6]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1066, 7]
type = HitDef
triggerall = (!HitCount && Var(5) < 6) || HitCount
trigger1 = !Time || !AnimTime
attr = A, SA
damage = ceil(30*Fvar(20)),8
animtype = Hard
guardflag = MAF
hitflag = MAF
priority = 4, Hit
getpower = 0,0
givepower = 20,10
pausetime = 8,8
sparkno = S6001
sparkxy = -9,-25*floor(const(size.yscale))
hitsound = F5, 2
guardsound = F6, 0
ground.type = High
ground.slidetime = 13
ground.hittime  = 16
guard.slidetime = 8
guard.hittime = 11
ground.velocity = -3.2
air.type = High
air.velocity = -2.1,-2.8
air.hittime = 15
fall = 1
fall.recover = 0
id = 1051
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1066, 8]
type = Null
triggerall = Cond(NumTarget,!(target,Time),0) && MoveHit && !Var(29) && FVar(21) > .3
trigger1 = (FVar(21) := FVar(21) - .1) && (Var(29) := 1)
ignorehitpause = 1

[State 1066, 9]
type = Gravity
trigger1 = 1

[State 1066, 10]
type = PlaySnd
trigger1 = AnimElem = 1 || !AnimTime
value = S190,0

[State 1066, 11]
type = PlaySnd
trigger1 = !Time
value = S190,1

[State 1066, 11]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 1052
;---------------------------------------------------------------------------
;Wall Cling
[Statedef 1100]
type    = S
movetype= I
physics = S
poweradd = 40
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 2

[State 1100, 1]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 1100, 2]
type = Null
triggerall = !var(59)
trigger1 = !Time
var(10) = Command = "holdfwd"

[State 1100, 3]
type = Null
triggerall = var(59)
trigger1 = !Time
var(10) = ifelse(Random < 900,0,1)

[State 1100, 3]
type = StateTypeSet
trigger1 = AnimElem = 2
statetype = A
physics = A

[State 1100, 4]
type = VelSet
trigger1 = AnimElem = 2
x = -BackEdgeDist * .05
y = -7.64

[State 1100, 5]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8032
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1100, 6]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8032
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1100, 7]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1100, 8]
type = PlaySnd
trigger1 = AnimElem = 2
value = S40,0

[State 1100, 9]
type = PlaySnd
trigger1 = !Time
value = S1000,0

[State 1100, 10]
type = ChangeState
trigger1 = Vel Y >= 0 && BackEdgeDist = 0 && Time >= 5
value = 1101

;---------------------------------------------------------------------------
;Wall Cling
[Statedef 1101]
type    = A
movetype= I
physics = N
velset = 0,0
anim = 1101
ctrl = 0
sprpriority = 2

[State 1101, 1]
type = VarAdd
trigger1 = 1
var(16) = 1

[State 1101, 2]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,1

[State 1100, 3]
type = Turn
triggerall = (PrevStateNo = 1105 || PrevStateNo = 1115)
trigger1 = !Time

[State 1101, 4]
type = PosAdd
trigger1 = Facing = 1 && ScreenPos X != 14
x = -(ScreenPos X - 14)

[State 1101, 5]
type = PosAdd
trigger1 = Facing = -1 && ScreenPos X != 306
x = (ScreenPos X - 306)

[State 1101, 6]
type = PlaySnd
triggerall = PrevStateNo = 1100 || PrevStateNo = 1105 || PrevStateNo = 1110 || PrevStateNo = 1115
trigger1 = !Time
value = S40,0

[State 1101, 9]
type = ChangeState
triggerall = !Var(37)
trigger1 = Cond(Var(44),(Command = "holdx" || Command = "holdy") || (NumExplod(90000200) || NumExplod(90000210)),(Command = "holda" || NumExplod(90000230)))
trigger2 = Power >= 500
trigger2 = Command = "holdfwd" && Cond(Var(44),(Command = "holdx" || Command = "holdy") || (NumExplod(90000200) && NumExplod(90000210)), Command = "holda" || NumExplod(90000230))
value = 1104

[State 1101, 7]
type = ChangeState
trigger1 = !var(59)
trigger1 = (NumExplod(90000009) || NumExplod(90000008) || NumExplod(90000007)) ^^ (NumExplod(90000002) || NumExplod(90000003) || NumExplod(90000001))
;trigger2 = var(59)
;trigger2 = Time >= 10 && ScreenPos Y <= 132
value =  1102

[State 1101, 8]
type = ChangeState
trigger1 = !var(59) && Cond(Var(44),(Command = "holda" || Command = "holdb") || (NumExplod(90000230) || NumExplod(90000240)),(Command = "holdb" || NumExplod(90000240)))
trigger2 = var(59) && Time >= 10 ; && (ScreenPos Y > 125 || P2BodyDist X < 24)
value =  1103


[State 1101, 10]
type = ChangeState
trigger1 = var(13) >= 100
value = 50
;---------------------------------------------------------------------------
;Wall Cling
[Statedef 1102]
type    = A
movetype= I
physics = N
anim = 1102
ctrl = 0
sprpriority = 2

[State 1101, 1]
type = VarAdd
trigger1 = 1
var(16) = 1

[State 1101, 2]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,1

[State 1101, 3]
type = PosAdd
trigger1 = Facing = 1 && ScreenPos X != 14
x = -(ScreenPos X - 14)

[State 1101, 4]
type = PosAdd
trigger1 = Facing = -1 && ScreenPos X != 306
x = (ScreenPos X - 306)

[State 1101, 5]
type = VelSet
triggerall = ScreenPos Y > 132
trigger1 = (NumExplod(90000009) || NumExplod(90000008) || NumExplod(90000007))
y = -2.5

[State 1101, 6]
type = VelSet
triggerall = Pos Y < 0
trigger1 = (NumExplod(90000002) || NumExplod(90000003) || NumExplod(90000001))
y = 2.5

[State 1101, 7]
type = VelSet
triggerall = ScreenPos Y <= 132
trigger1 = (NumExplod(90000009) || NumExplod(90000008) || NumExplod(90000007))
trigger2 = var(59) 
y = 0

[State 1101, 8]
type = VelSet
triggerall = Pos Y >= 0
trigger1 = (NumExplod(90000002) || NumExplod(90000003) || NumExplod(90000001))
y = 0

[State 1101, 6]
type = ChangeState
triggerall = !Var(37)
trigger1 = Cond(Var(44),(Command = "holdx" || Command = "holdy") || (NumExplod(90000200) || NumExplod(90000210)),Command = "holda" || NumExplod(90000230))
trigger2 = Power >= 500
trigger2 = Command = "holdfwd" && Cond(Var(44),(Command = "holdx" || Command = "holdy") || (NumExplod(90000200) && NumExplod(90000210)), Command = "holda" || NumExplod(90000230))
value = 1104

[State 1101, 6]
type = ChangeState
trigger1 = !var(59) && !((NumExplod(90000009) || NumExplod(90000008) || NumExplod(90000007)) || (NumExplod(90000002) || NumExplod(90000003) || NumExplod(90000001)))
trigger2 = var(59) && ScreenPos Y = 132 || Pos Y = 0
value = 1101

[State 1101, 5]
type = ChangeState
trigger1 = !var(59) && Cond(Var(44),(Command = "holda" || Command = "holdb") || (NumExplod(90000230) || NumExplod(90000240)),(Command = "holdb" || NumExplod(90000240)))
trigger2 = var(59) && Time >= 10 ;(ScreenPos Y > 125 || P2BodyDist X < 24) && 
value = 1103


[State 1101, 7]
type = ChangeState
trigger1 = var(13) >= 100
value = 50
;---------------------------------------------------------------------------
;Wall Cling
[Statedef 1103]
type    = A
movetype= I
physics = A
poweradd = 40
anim = 41
ctrl = 0
sprpriority = 2

[State 1103, 1]
type = VelSet
triggerall = !Time
trigger1 = !var(59) && !(Command = "holdfwd" || Command = "holdback")
trigger2 = var(59) && (abs(P2BodyDist X) <= 100 && abs(P2BodyDist X) > 37)
x = 4.9

[State 1103, 2]
type = VelSet
triggerall = !Time
trigger1 = !var(59) && Command = "holdfwd"
trigger2 = var(59) && abs(P2BodyDist X) > 100
x = 7.1

[State 1103, 3]
type = VelSet
triggerall = !Time
trigger1 = !var(59) && Command = "holdback"
trigger2 = var(59) && abs(P2BodyDist X) <= 37
x = 0.9

[State 1103, 4]
type = VelSet
triggerall = !Time
trigger1 = !var(59) && !((NumExplod(90000009) || NumExplod(90000008) || NumExplod(90000007)) || (NumExplod(90000002) || NumExplod(90000003) || NumExplod(90000001)))
trigger2 = var(59) && (abs(P2BodyDist X) <= 37 || (abs(P2BodyDist X <= 193) && abs(P2BodyDist X) > 100))
y = -3.1

[State 1103, 3]
type = VelSet
triggerall = !Time
trigger1 = !var(59) && (NumExplod(90000009) || NumExplod(90000008) || NumExplod(90000007)) 
trigger2 = var(59) && abs(P2BodyDist X) > 193
y = -6.1

[State 1103, 5]
type = VelSet
triggerall = !Time
trigger1 = !var(59) && (NumExplod(90000002) || NumExplod(90000003) || NumExplod(90000001))
trigger2 = var(59) && (abs(P2BodyDist X) <= 65 && abs(P2BodyDist X) > 37)
y = -1.1

[State 1103, 6]
type = PlaySnd
trigger1 = !Time
value = S40,0

[State 1103, 7]
type = PlaySnd
trigger1 = !Time
value = S1050,1

[State 1103, 8]
type = CtrlSet
trigger1 = Time = 5
value = 1
;---------------------------------------------------------------------------
;Wall Cling
[Statedef 1104]
type    = A
movetype= I
physics = N
velset = 0,0
anim = 1104
ctrl = 0
sprpriority = 2

[State 1104, 1]
type = VarAdd
trigger1 = 1
var(16) = 1

[State 1104, 2]
type = VarSet
trigger1 = !Time
var(12) = Command = "holdfwd" && Power >= 500

[State 1104, 3]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,1

[State 1104, 4]
type = PosAdd
trigger1 = Facing = 1 && ScreenPos X != 14
x = -(ScreenPos X - 14)

[State 1104, 5]
type = PosAdd
trigger1 = Facing = -1 && ScreenPos X != 306
x = (ScreenPos X - 306)

[State 1104, 6]
type = Helper
triggerall = !Var(12)
trigger1 = AnimElem = 2
name = "Star"
ID = 1000
stateno = 1001
pos = 28,-45
postype = p1
facing = 1
ownpal = 1

[State 1104, 7]
type = VarAdd
trigger1 = AnimElem = 2
var(37) = 1

[State 1104, 8]
type = PalFX
triggerall = Var(12)
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1104, 9]
type = PlaySnd
triggerall = Var(12)
trigger1 = !Time
value = F799,0
channel = 10

[State 1104, 10]
type = Helper
triggerall = Var(12)
trigger1 = AnimElem = 2
name = "Windmill Shruiken"
ID = 1010
stateno = 1011
pos = 28,-37
postype = p1
facing = 1
ownpal = 1

[State 1104, 12]
type = PowerAdd
trigger1 = !Time
value = ifelse(var(12), -500, 40)

[State 1104, 13]
type = PowerAdd
trigger1 = !var(12) && !Time
value = 80

[State 1104, 14]
type = PlaySnd
trigger1 = AnimElem = 2
value = S1000,0
channel = 0

[State 1104, 15]
type = PlaySnd
trigger1 = !var(12) && AnimElem = 3
value = S1000,1

[State 1104, 16]
type = ChangeState
trigger1 = !AnimTime
value =  Cond(var(13) >= 100,50,1101)

;---------------------------------------------------------------------------
;Wall Cling
[Statedef 1105]
type    = S
movetype= I
physics = S
poweradd = 80
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 2

[State 1100, 2]
type = VarSet
trigger1 = 1
var(10) = 1

[State 1100, 1]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 1100, 3]
type = StateTypeSet
trigger1 = AnimElem = 2
statetype = A
physics = A

[State 1100, 4]
type = VelSet
trigger1 = AnimElem = 2
x = FrontEdgeDist * .05
y = -7.64

[State 1100, 5]
type = Explod
triggerall = !NumPartner
trigger1 = !Time && TeamSide = 1
anim = 8032
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1100, 6]
type = Explod
triggerall = !NumPartner
trigger1 = !Time && TeamSide = 2
anim = 8032
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1100, 7]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1100, 8]
type = PlaySnd
trigger1 = AnimElem = 2
value = S40,0

[State 1100, 9]
type = PlaySnd
trigger1 = !Time
value = S1000,0

[State 1100, 10]
type = ChangeState
triggerall = Vel Y >= 0 &&  FrontEdgeDist = 0
trigger1 = Time >= 5
value = 1101
;---------------------------------------------------------------------------
;EX Wall Cling
[Statedef 1110]
type    = S
movetype= I
physics = S
poweradd = -500
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 2

[State 1100, 1]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 1100, 3]
type = StateTypeSet
trigger1 = AnimElem = 2
statetype = A
physics = A

[State 1100, 4]
type = VelSet
trigger1 = AnimElem = 2
x = -BackEdgeDist * .05
y = -7.64

[State 1100, 5]
type = AssertSpecial
triggerall = !var(10)
trigger1 = (GameTime % 2) = 0
flag = invisible

[State 1100, 6]
type = NotHitBy
trigger1 = Time <= 10
value = SCA,AA,AP,AT
time = 1

[State 1100, 7]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1100, 8]
type = PlaySnd
trigger1 = !Time
value = F799,0
channel = 10

[State 1100, 9]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8035
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1100, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8035
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1100, 11]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1100, 12]
type = PlaySnd
trigger1 = AnimElem = 2
value = S40,0

[State 1100, 15]
type = PlaySnd
trigger1 = !Time
value = S1000,0

[State 1100, 16]
type = ChangeState
triggerall = Vel Y >= 0 && BackEdgeDist = 0
trigger1 = Time >= 5
value = 1101
;---------------------------------------------------------------------------
;EX Wall Cling
[Statedef 1115]
type    = S
movetype= I
physics = S
poweradd = -500
velset = 0,0
anim = 1100
ctrl = 0
sprpriority = 2

[State 1115, 1]
type = ScreenBound
trigger1 = 1
value = 1
movecamera = 0,1

[State 1100, 3]
type = StateTypeSet
trigger1 = AnimElem = 2
statetype = A
physics = A

[State 1100, 4]
type = VelSet
trigger1 = AnimElem = 2
x = FrontEdgeDist * .05
y = -7.64

[State 1100, 5]
type = AssertSpecial
trigger1 = (GameTime % 2) = 0
flag = invisible

[State 1100, 6]
type = NotHitBy
trigger1 = Time <= 10
value = SCA,AA,AP,AT
time = 1

[State 1100, 7]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1100, 8]
type = PlaySnd
trigger1 = !Time
value = F799,0
channel = 10

[State 1100, 9]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8035
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1100, 10]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8035
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -3
ownpal = 1
removeongethit = 1

[State 1100, 11]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1100, 12]
type = PlaySnd
trigger1 = AnimElem = 2
value = S40,0

[State 1100, 15]
type = PlaySnd
trigger1 = !Time
value = S1000,0

[State 1100, 16]
type = ChangeState
triggerall = Vel Y >= 0
triggerall = FrontEdgeDist = 0
trigger1 = Time >= 5
value = 1101